package com.huiHang.auth.api;

import com.huiHang.auth.pojo.dto.UserLoginDTO;
import com.huiHang.auth.pojo.dto.UserRegistrationDTO;
import com.huihang.core.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(name = "auth")
public interface  AuthApi {
    @GetMapping(value = "mail-auth/operatorLogin")
    public String operatorLogin();

    @GetMapping(value = "auth/verificationCode")
    public Result<String> verificationCode(@RequestParam String phone);

    @PostMapping(value = "auth/userRegistration")
    public Result<String> userRegistration(@RequestBody UserRegistrationDTO dto);

    @PostMapping(value = "auth/userLogin")
    public Result<String> userLogin(@RequestBody UserLoginDTO dto);
}
